package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmy.cultivate.entity.OrderDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.Organization;
import com.xmy.cultivate.entity.Subjects;
import com.xmy.cultivate.entity.views.EnrollList;
import com.xmy.cultivate.entity.views.FirstSignUp;
import com.xmy.cultivate.entity.views.IncomeDayReport;
import com.xmy.cultivate.entity.views.ResApplyGather;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单报名信息 服务类
 * </p>
 *
 * @author min
 * @since 2022-08-01
 */
public interface IOrderDetailService extends IService<OrderDetail> {


    public abstract IPage<EnrollList> getEnrollList(IPage<?> page, Wrapper wrapper);

    public abstract Map<String, BigDecimal> enrollListMoney(Wrapper wrapper);

    public abstract List<OrderDetail> orderDetail(Wrapper wrapper);

    public  abstract  Integer getApplyCountForSubjects(Long schoolId,Long studentId,Long subjectsId,Integer newYeartPart,Integer newNum);

    public abstract OrderDetail getLastOneForStudent(Long schoolId,Long studentId,Long subjectsId);

    public abstract List<OrderDetail> GetLessonByStuInfoId(Wrapper wrapper);

    public abstract List<Subjects> GetSubjectsByStuInfoId(Wrapper wrapper);


    /**
     * 报读通过课程，获取在读信息
     * @param courseId
     * @param studentId
     * @return
     */
    public abstract List<OrderDetail> getLessonByCourseId(Long courseId,Long studentId,Long schoolId);

    /**
     * 报读通过科目，获取在读信息
     * @param subjectsId
     * @param studentId
     * @return
     */
    public abstract List<OrderDetail> getLessonForSubjects(Long subjectsId,Long studentId,Long schoolId);

    /**
     * 获取报读校区
     * @param wrapper
     * @return
     */
    public abstract List<Organization> getSignUpSchoolListForWhere(@Param(Constants.WRAPPER) Wrapper wrapper);

    public abstract FirstSignUp getFirstSignUp(Long studentId, Long gradeId, Integer count);


    public abstract Boolean stopCourse(Long orderDetailId);

    public abstract IPage<IncomeDayReport> getIncomeDayReport(IPage<?> page, Wrapper wrapper);

    public abstract List<OrderDetail> getBigFifteeList();

    public abstract Integer getUseCourseHouse(Wrapper wrapper);

    public abstract void courseAuto();

    List<OrderDetail> getOrderDetailForResidueCoruseCount(Integer yearPart, Integer quarterNum);
}
